from django.db import models
from userapp.models import User
from goodsapp.models import Goods
# Create your models here.

class Cart(models.Model):
    goods_img = models.ImageField(upload_to='static/')
    goods_name = models.CharField(max_length=100,verbose_name='商品名')
    goods_price = models.FloatField(verbose_name='价格')
    goods_detail = models.CharField(max_length=50,verbose_name='描述')
    number = models.IntegerField(verbose_name='数量')
    user = models.ForeignKey(User,on_delete=models.CASCADE)
    goods = models.ForeignKey(Goods,on_delete=models.CASCADE)


